package beans;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

@Entity
@Table(name = "express_branch")
public class Express_Branch {
	private int expressBranchId;
	private Branch branch;
	private Express express;

	@GenericGenerator(name = "generator", strategy = "native")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "expressbranch_id", unique = true, nullable = false)
	public int getExpressBranchId() {
		return expressBranchId;
	}

	public void setExpressBranchId(int expressBranchId) {
		this.expressBranchId = expressBranchId;
	}

	@ManyToOne
	@JoinColumn(name = "expressbranch_branchid")
	public Branch getBranch() {
		return branch;
	}

	public void setBranch(Branch branch) {
		this.branch = branch;
	}

	@ManyToOne
	@JoinColumn(name = "expressbranch_expressid")
	public Express getExpress() {
		return express;
	}

	public void setExpress(Express express) {
		this.express = express;
	}
}
